<%@page import="java.sql.*"%>
<%
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/test","root","123456");
Statement sql = conn.createStatement();
ResultSet rs = sql.executeQuery("select * from blackjuly order by code");
%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>成员信息</title></head>
<body>
<center>
	<table Cellpadding="15" Border="5" BorderColor="red">
		<tr><td>name</td><td>password</td><td>code</td></tr>
		<%
		while(rs.next()){
		String name = rs.getString("name");
		name = new String(name.getBytes("ISO-8859-1"), "gbk");
		String password = rs.getString("password");
		password = new String(password.getBytes("ISO-8859-1"), "gbk");
		String code = rs.getString("code");
		code = new String(code.getBytes("ISO-8859-1"), "utf-8");
		%>
		<tr>
			<td><% out.println(name);%></td><td><% out.println(password);%></td><td><% out.println(code);%></td>
			<% } %>
		</tr>
	</table>
</center>
</body>
</html>